data = rand(10000,15);
data(:,end) = 1;
w = rand(1,10) -0.5;

data(:,5) = sum(data(:,6:end).*repmat(w,size(data,1),1),2);

data(data(:,5)>0,5)=1;
data(data(:,5)<0,5)=-1;
w_  =w;